package com.lxyk.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lxyk.pojo.Worker;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface WorkerService extends IService<Worker> {
    /*
    * 添加送水工
    * @param worker送水工信息
    * @return 受影响的行数，大于零添加成功，否则添加失败
    * */
    int saveWorker(Worker worker);
    /*
    * 根据送水工ID获取对应的送水工信息
    *
    * @param wid 送水工id
    * @return 送水工信息
    * */
    Worker getWorkerById(Integer wid);
    /*
    * 修改送水工
    * @param worker 送水工信息
    * @return 受影响的行数，大于0修改成功小于0修改失败
    * */
    int updateWorker(Worker worker);

    //模糊查询带分页
    IPage<Worker> queryByWorker(Worker worker,Integer current,Integer size);

    //查询所有，不带分页
    List<Worker> listWorker();

    //上传文件到oss
    String upload(MultipartFile file);


}
